<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		
	</head>
	<body>
		<input type="button" value="click1" onclick="cli()" onmouseover="over()" onmouseout="out()"/>
		<input type="button" value="click2" />
		
		<script type="text/javascript">
			window.onload = function() {
				var btn2 = document.getElementsByTagName('input')[1];
				btn2.onclick = function() {
					console.log('btn2.click');
				}
				
				btn2.onmouseover = function() {
					console.log('btn2.onmouseover');
				}
				
				btn2.onmouseout = function() {
					console.log('btn2.onmouseout');
				}
			}
			
			
			function cli() {
				console.log('cli');
			}
			
			function over() {
				console.log('over');
			}
			
			function out() {
				console.log('out');
			}
		</script>
	</body>
</html>
